package com.training.bt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("tb_post")
public class Post {
    @TableId(type = IdType.AUTO)
    private Long postId;
    private Long userId;
    private String postTitle;
    private String postContent;
    private LocalDateTime postTime = LocalDateTime.now();
    private String username; // 发布者用户名
    private Long commentCount;

    // Getter & Setter
    public Long getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Long commentCount) {
        this.commentCount = commentCount;
    }
}